import { createStore } from "vuex";

export default createStore({
    state: {
        //控制搜索弹框的显示
        isSearch: false,
        //热门职位
        isSearchDetail: false,
        isHot: true,
        isDel:false,
        isMyResume:true,
        isCompany:false,
        uuid:window.localStorage.getItem('OPENID'), // 用户id 
        unitLogin:window.localStorage.getItem('COOKIE'), //企业登陆
        unitData:window.localStorage.getItem('UNIT'), //企业信息
    },
    mutations: {
    	//传入数据源
        getUnitLogin(state,data) {
            state.unitLogin = data
            window.localStorage.setItem('COOKIE', data)
        },
        //传入数据源
        getUnitData(state,data) {
            state.unitData = data
            window.localStorage.setItem('UNIT', data)
        },
        //传入数据源
        setOpenidData(state,data) {
            state.uuid = data
            window.localStorage.setItem('OPENID', data)
        },
    },
    actions: {},
    modules: {},
});
